package com.net.oil.shop;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

import com.net.oil.R;
import com.net.oil.app.Constant;
import com.net.oil.main.fragment.ShopFragment;

public class ShopListActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop_list);
        initView();
    }

    private void initView() {
        int carId = getIntent().getIntExtra(Constant.INTENT_CAR_ID, -1);
        String carType = getIntent().getStringExtra(Constant.INTENT_CAR_TYPE);
        ShopFragment shopFragment = ShopFragment.newInstance(carId, carType);
        getSupportFragmentManager().beginTransaction().replace(R.id.content, shopFragment).commit();
    }
}
